Area : DSP Date : Tue Jan 05, 21:01 From : Stepan Otarov 2:5061/7.30 To : Vladimir L. Vasilevsky Subj : Windowing? ਢ ⥡ Vladimir! H' Vladimir L. Vasilevsky ᠫ Stanislav Tihohod Windowing? ST>> ⠪ ᠡ? ᫥ p p ST>> p⬮, 騩 p pp p. p祬 ⥪ ST>> ᭥ 筮 pp⥫쭮 p᪠. VV> ᫮: । ६ 㭪. VV> 襭 筮 業 ᯥ. ⢥ "襩" VV> 㭪樨 ᯮ " ": ᪮쪮... /************************************************************************* black - Blackman window Scales both real and imaginary parts of input array in-place. Requires COMPLEX pointer and length of input array. void black(COMPLEX *x, int n) *************************************************************************/ void black(x, n) COMPLEX *x; int n; { int i; double black,factor; factor = 8.0*atan(1.0)/(n-1); for (i=0; ireal *= black; x->imag *= black; x++; } } /************************************************************************* ham - Hamming window Scales both real and imaginary parts of input array in-place. Requires COMPLEX pointer and length of input array. void ham(COMPLEX *x, int n) *************************************************************************/ void ham(x, n) COMPLEX *x; int n; { int i; double ham,factor; factor = 8.0*atan(1.0)/(n-1); for (i = 0 ; i < n ; i++){ ham = 0.54 - 0.46*cos(factor*i); x->real *= ham; x->imag *= ham; x++; } } /************************************************************************* han - Hanning window Scales both real and imaginary parts of input array in-place. Requires COMPLEX pointer and length of input array. void han(COMPLEX *x, int n) *************************************************************************/ void han(x, n) COMPLEX *x; int n; { int i; double factor,han; factor = 8.0*atan(1.0)/(n-1); for (i = 0 ; i < n ; i++){ han = 0.5 - 0.5*cos(factor*i); x->real *= han; x->imag *= han; x++; } } /************************************************************************* harris - 4 term Blackman-Harris window Scales both real and imaginary parts of input array in-place. Requires COMPLEX pointer and length of input array. void harris(COMPLEX *x, int n) *************************************************************************/ void harris(x, n) COMPLEX *x; int n; { int i; double harris,factor,arg; factor = 8.0*atan(1.0)/n; for (i=0; ireal *= harris; x->imag *= harris; x++; } } /************************************************************************* triang - triangle window Scales both real and imaginary parts of input array in-place. Requires COMPLEX pointer and length of input array. void triang(COMPLEX *,int n) *************************************************************************/ void triang(x, n) COMPLEX *x; int n; { int i; double tri,a; a = 2.0/(n-1); for (i = 0 ; i <= (n-1)/2 ; i++) { tri = i*a; x->real *= tri; x->imag *= tri; x++; } for ( ; i < n ; i++) { tri = 2.0 - i*a; x->real *= tri; x->imag *= tri; x++; } } SO_ > 㦭 ⠪ , ⮣ . ! Stepan. Night F0X --- , 2.50.Beta5+ ஢ ... * Origin: Night F0X BBS (8632)517458 Private System (2:5061/7.30) Area : DSP Date : Sat Jan 02, 08:58 From : Vladimir Sementchik 2:450/122.36 To : Stanislav Tihohod Subj : Windowing? p Stanislav! p ⥡ p ⮪. ST>> ⠪ ᠡ? ᫥ p p p⬮, ST>> 騩 p pp p. p祬 ⥪ ᭥ ST>> 筮 pp⥫쭮 p᪠. p訩 p 㡫 .66 N1 1978. p. 60-96 ᫨ p. 㢠 稪 p mailto:sdv@rfe.bsu.unibel.by ICQ 19026933 ... @c:\MAIL\golded\TAGLINE.cfg --- * Origin: * * * p ⠬, . * (2:450/122.36)